def inbound_1():
  """Inbound call to DN2, abnormal release Ext1DN1"""
  Ext1SipPhone1.MakeCall(DN2)
  Ext1SipPhone1.ReleaseCall()

def inbound_2():
  """Inbound call to DN2,  release DN2"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.ReleaseCall()


def inbound_3():
  """Inbound call to DN2,  release Ext1DN1"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  Ext1SipPhone1.ReleaseCall()


def inbound_6():
  """Inbound to  DN2, two step transfer to DN3, release DN3"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteTransfer()
  SipPhone3.ReleaseCall()
  
def inbound_7():
  """Inbound to  DN2, DN2 init transfer to DN3, release DN1, release DN2"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  Ext1SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()
  
def inbound_8():
  """Inbound to  DN2, DN2 init transfer to DN3, release DN1, DN3 answer, release DN3"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  Ext1SipPhone1.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone3.ReleaseCall()  
  
def inbound_9():
  """Inbound to  DN2, DN1 init transfer to DN3, release DN2, DN3 answer, release DN3"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  Ext1SipPhone1.InitiateTransfer(DN3)
  SipPhone2.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone3.ReleaseCall()   

  
def inbound_12():
  """Inbound call to  DN2, two step transfer to DN3, release DN3"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteTransfer()
  SipPhone3.ReleaseCall()

def inbound_13():
  """Inbound call to  DN2, two step transfer to DN3, abnormal release Ext1DN1"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.ReleaseCall()
  Ext1SipPhone1.ReleaseCall()

def inbound_14():
  """Inbound call to DN2, two step transfer to DN3, completed before consulted party answer"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  SipPhone3.AnswerCall()
  Ext1SipPhone1.ReleaseCall()

def inbound_15():
  """Inbound call, two step transfer to DN3, completed before consulted party answer, abnor"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  Ext1SipPhone1.ReleaseCall()


def inbound_21():
  """Inbound call to DN2, inbound conference to DN3, release Ext1DN1, DN2"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteConference()
  Ext1SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()

def inbound_22():
  """Inbound call to DN2, DN2 cinit conference to DN3, abnorl release DN2, release Ext1DN1"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.ReleaseCall()
  Ext1SipPhone1.ReleaseCall()



def inbound_26():
  """Inbound call to DN2, DN2 conference to DN3, completed before consulted party answer"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.CompleteConference()
  SipPhone3.AnswerCall()
  Ext1SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()

def inbound_27():
  """Inbound call to DN2, DN2 conf to DN3, compl before cons. party answer, abnor. release DN2"""
  Ext1SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.CompleteConference()
  SipPhone2.ReleaseCall()
  SipPhone3.AnswerCall()
  Ext1SipPhone1.ReleaseCall()



